//package com.poker.base;
//
//import com.github.lazyboyl.websocket.security.WebsocketSecurity;
//import com.github.lazyboyl.websocket.server.channel.entity.SocketRequest;
//import com.poker.service.UserService;
//import io.netty.channel.ChannelHandlerContext;
//import org.springframework.beans.factory.annotation.Autowired;
//
//public class WebsocketSecurityImpl implements WebsocketSecurity {
//
//    /**
//     * 这个authService就是我们平时在spring里面写的service
//     **/
//    @Autowired
//    private UserService userService;
//
//    @Override
//    public int level() {
//        return 10;
//    }
//
//
//
//    @Override
//    public Boolean authentication(ChannelHandlerContext ctx, SocketRequest socketRequest) {
////        Boolean isPass = authService.authUrl(socketRequest.getUrl());
////        System.out.println("----我在这里做了一个模拟的鉴权过程---");
////        if(!isPass){
////            ctx.channel().writeAndFlush(new TextWebSocketFrame(JsonUtils.objToJson(new SocketResponse(HttpResponseStatus.UNAUTHORIZED.code(), "授权不通过！"))));
////        }
//        return true;
//    }
//
//
//
//}
